package cn.amossun.starter.web.data.security;

import cn.amossun.starter.common.util.Page;
import cn.amossun.starter.web.data.security.entity.DataSecurityVersionBO;
import cn.amossun.starter.mybatis.data.security.properties.ResultMapConfiguration;
import cn.amossun.starter.redis.cache.exception.RedisCacheConfigException;
import cn.amossun.starter.redis.cache.exception.RedisRelatedException;

import java.util.List;

/**
 * @description: 数据安全版本记录
 * @author: Amos.Sun
 * @DateTime: 2020/03/08 17:39
 **/
public interface IDataSecurityVersion extends IServiceRedisConfig {

	List<DataSecurityVersionBO> getAllRecords(String serviceName) throws RedisRelatedException, RedisCacheConfigException;

	Page getRecords(String serviceName, int current, int size, String version) throws RedisRelatedException, RedisCacheConfigException;

	boolean addRecords(String userId, String serviceName, List<ResultMapConfiguration> newsList) throws RedisRelatedException, RedisCacheConfigException;

	DataSecurityVersionBO get(String serviceName, String version) throws RedisCacheConfigException, RedisRelatedException;

	boolean isLastVersion(String serviceName, String version) throws RedisCacheConfigException, RedisRelatedException;

}
